import {lazy} from "react"
import { RouterList } from "../untils/index"
// FriendsO, HomeO, Search, SettingO 
export let mainrouter=[{
    path:"/index/classfy",
    element:lazy(()=>import("../page/index/Classfy")),
    title:"分类",
    icon:"FriendsO"
},{
    path:"/index/home",
    element:lazy(()=>import("../page/index/Home")),
    title:"首页",
    icon:"HomeO"
},{
    path:"/index/my",
    element:lazy(()=>import("../page/index/My")),
    title:"我的",
    icon:"Search"
},{
    path:"/index/nav",
    element:lazy(()=>import("../page/index/Nav")),
    title:'导航',
    icon:"SettingO"
}]

const routes:RouterList=[{
    path:"/index",
    element:lazy(()=>import("../page/Index")),
    children:mainrouter
},{
    path:"*",
    element:lazy(()=>import("../page/Error"))
},{
    path:"/deils/:id",
    element:lazy(()=>import("../page/Deils"))
},{
    path:"/login",
    element:lazy(()=>import("../page/Login"))
},{
    path:'/',
    to:"/index/home"
}]
export default routes